
if [ ! -d /log/was/{###SERVER_NAME###}/accesslog ]; then
    mkdir -p /log/was/{###SERVER_NAME###}/accesslog
    ln -s /log/was/{###SERVER_NAME###}/accesslog accesslog
fi

if [ ! -d /log/was/{###SERVER_NAME###}/nohup ]; then
    mkdir -p /log/was/{###SERVER_NAME###}/nohup
    ln -s /log/was/{###SERVER_NAME###}/nohup nohup
fi

if [ ! -d /log/was/{###SERVER_NAME###}/nohup ]; then
    mkdir -p /log/was/{###SERVER_NAME###}/log
    ln -s /log/was/{###SERVER_NAME###}/log log
fi

mv start.sh start{###SERVER_NAME###}.sh
mv stop.sh stop{###SERVER_NAME###}.sh

chmod u+x *.sh
chmod -R og-rwx conf deploy

#### instance slim ######

# removing web console
#rm -rf deploy/jmx-console.war

# removing management
#rm -rf deploy/management

# removing rmiadaptor service
rm deploy/jmx-invoker-service.xml
rm lib/jmx-adaptor-plugin.jar

# removing mail service
rm deploy/mail-service.xml
rm deploy/mail-ra.rar
rm lib/mail.jar
rm lib/mail-plugin.jar

# Removing Client Deployer Service
rm deploy/client-deployer-service.xml

# Removing RMI over HTTP
rm -rf deploy/http-invoker.sar

# Removing XA Datasource Support
rm deploy/jboss-xa-jdbc.rar

# Removing the Email Monitoring Service
rm deploy/monitoring-service.xml
rm lib/jboss-monitoring.jar

# Removing the UUID Key Generator using in CMP primary keys
rm -rf deploy/uuid-key-generator.sar
rm lib/autonumber-plugin.jar

# Removing The Bean Shell Deployer
rm deploy/bsh-deployer.xml
rm lib/bsh-deployer.jar
rm lib/bsh.jar
